#ifndef __KEYBOARD__
#define __KEYBOARD__

#define CMD_PORT 0x64
#define BUF_PORT 0x60

#define INPUT_BUFFER (1 << 1)
#define OUTPUT_BUFFER (1 << 0)
#define SELFCHECK (1 << 2)

typedef int bool;
#ifndef TRUE
#define TRUE  1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#define ACKNOWLEDGE 0xFA
#define KEY_PRESS 0x80

bool canWrite(unsigned char in);
bool canRead(unsigned char in);
bool keyboardIsOkay(unsigned char in);
void sendCommandToKeyboard(unsigned char cmd);
void clearKeyboardBuffer(void);
void initKeyboard(void);
void handleKeyboardInterrupt();

#endif
